/**
 * @Author: Lenovo
 * @Date: 2024/7/19 15:58
 * @description:
 */
public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.getLeafNodeCount(root);
        System.out.println("叶子节点的个数:"+BinaryTree.leafNode);
        System.out.println("叶子节点的个数:"+binaryTree.getLeafNodeCount2(root));
        System.out.println("树的第三层结点:"+binaryTree.getKLevelNodeCount(root,3));
        System.out.println("树的高度:"+binaryTree.getHeight(root));
        BinaryTree.TreeNode find = binaryTree.find(root,'D');
        System.out.println(find);
    }
    public static void main1(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.inOrder(root);
        System.out.println();
        binaryTree.postOrder(root);
        System.out.println();
        System.out.println("节点个数:"+binaryTree.size2(root));
        binaryTree.size(root);
        System.out.println(BinaryTree.nodeSize);
    }
}
